﻿<!-- WorkflowEngineSampleCode -->
<div [@routerTransition]>
    <section class="content-header">
      <div class="container-fluid">
        <div class="row">
          <div class="col-6">
            <h1>{{ "Workflow schemes" | localize }}</h1>
          </div>
          <div class="col-6 text-right">
            <a href="javascript:;"
              class="btn bg-blue"
              (click)="createScheme()">
              <i class="fa fa-plus-square"></i>
              {{ "Create" | localize }}
            </a>
          </div>
        </div>
      </div>
    </section>
    <section class="content px-2">
      <div class="container-fluid">
        <div class="card">
          <div class="card-body">
            <div class="table-responsive">
              <table class="table table-striped table-bordered"
                [busy]="isTableLoading">
                <thead class="bg-light">
                  <tr>
                    <th>{{ "Code" | localize }}</th>
                    <th style="width: 200px;">{{ "Actions" | localize }}</th>
                  </tr>
                </thead>
                <tbody>
                  <tr *ngFor="let scheme of schemes">
                    <td>{{ scheme.code }}</td>
                    <td>
                      <button type="button"
                        class="btn btn-sm bg-secondary"
                        (click)="editScheme(scheme)">
                        <i class="fas fa-pencil-alt"></i>
                        {{ "Edit" | localize }}
                      </button>
                      <button type="button"
                        class="btn btn-sm bg-danger mx-2"
                        (click)="delete(scheme)">
                        <i class="fas fa-trash"></i>
                        {{ "Delete" | localize }}
                      </button>
                    </td>
                  </tr>
                </tbody>
              </table>
            </div>
          </div>
        </div>
      </div>
    </section>
  </div>